#[warn(unused_variables)]
fn main() {
    match age() {
        0 => println!("invalid age"),
        n @ 1..=15 => println!("child {}", n),
        n @ 16..=100 => println!("成年了啊！ {}", n),
        n => println!("other{}", n),
    }

    match some_number() {
        Some(n @ 42) => println!("猜中答案={}", n),
        Some(n) => println!("hello,{}", n),
        _ => println!("other .."),
    }
}

fn age() -> u32 {
    15
}

fn some_number() -> Option<u32> {
    Some(43)
}
